home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13263 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why is C faster than FORTRAN?
  5. Date: 5 Apr 1996 12:01:19 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4k3n5f$l5s@solutions.solon.com>
  8. References: <1996Mar20.132506.91237@ucl.ac.uk> <4jpabs$4pv@opal.southwind.net> <danpop.828650092@rscernix>
  9. Reply-To: seebs@solon.com
  10. NNTP-Posting-Host: solutions.solon.com
  11.  
  12. In article <danpop.828650092@rscernix>, Dan Pop <danpop@mail.cern.ch> wrote:
  13. >Once upon a time this approach used to work.  For a modern processor,
  14. >be it Pentium (Pro) or any RISC flavour, only a wizard could tell which
  15. >assembly code sequence is faster simply by looking at the code.  The rest
  16. >of us mere mortals are condemned to benchmarking the compiler output in
  17. >order to decide which is more efficient.
  18.  
  19. Further, unless the languages are basically identical, and the optimizers are
  20. very similar, the chances are that each program solves a fundementally
  21. different problem, and that there will be no simple correspondance between the
  22. two assebly outputs.
  23.  
  24. Even if the compiler can produce assembler; I've had at least one which
  25. produced different object code for C->assembly->object than it did for
  26. C->intermediate form->object.  In which case, of course, you can't tell much
  27. from the assembler (which was, if memory serves, slightly worse.)
  28.  
  29. -s
  30. -- 
  31. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  32. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  33. FUCK the communications decency act.  Goddamned government.  [literally.]
  34. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  35.